package com.grape.dp.observer.simple;

/**
 * 描述:SimpleTest
 * @author: myx
 * @date: 2019/7/29 0029
 * Copyright © 2019-grape. All rights reserved.
 */
public class SimpleTest {
    public static void main(String[] args) {
        // 1.创建具体的在主题
        AbstractSubject abstractSubject = new WeChatSubject();
        // 2.开始注册或者添加观察者
        abstractSubject.addObServer(new UserObServer("aric"));
        abstractSubject.addObServer(new UserObServer("ann"));
        // 3.群发消息
        abstractSubject.notifyObServer("沐宇熙设计模式");
    }
}
